home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / qbbs / acf540r0.zip / TOZIP.BAT < prev    next >
DOS Batch File  |  1992-01-17  |  3KB  |  137 lines

  1. @echo off
  2. REM ----------------------------------------------------------------------
  3. REM ACFExtended Batch for ACFiles
  4. REM
  5. REM Arguments: %1 - Path to File,
  6. REM Arguments: %2 - Filename,
  7. REM Arguments: %3 - Filename Without .EXT
  8. REM Arguments: %4 - Extension of Filename (No ., just EXT)
  9. REM
  10. REM This one does just about everything you want 8-)
  11. REM It converts to ZIP, scans for viri, etc.
  12. REM ----------------------------------------------------------------------
  13. :
  14. :Make file have today's date
  15. :
  16. newdate %1%2
  17. :
  18. REM ----------------------------------------------------------------------
  19. :
  20. :Check For ARC/LZH/PAK/ZOO/ZIP Files
  21. :IF One of those, goto ZIP for Conversion
  22. :
  23. :Set Default Return Message
  24. :
  25. if %4 == ZIP acf_ret MSG No Conversion Needed/No Viri - Thanks!
  26. :
  27. :
  28. if %4 == ARJ goto zip
  29. if %4 == ARC goto zip
  30. if %4 == LZH goto zip
  31. if %4 == PAK goto zip
  32. if %4 == ZOO goto zip
  33. :
  34. goto end
  35. :
  36. REM ----------------------------------------------------------------------
  37. :
  38. REM ZIP - This Converts to .ZIP, Scans via. McAffee's Scan
  39. :
  40. :zip
  41. md 1111
  42. cd 1111
  43. if %4 == ARJ arj e %1%3
  44. if %4 == LZH lha e %1%3
  45. if %4 == PAK pak e %1%3
  46. if %4 == ZOO zoo e %1%3
  47. if %4 == ARC pkxarc %1%3
  48. :
  49. REM ----------------------------------------------------------------------
  50. :
  51. : At this point we know it doesn't contain a known virus.
  52. :
  53. : If not ZIP file, then convert to .ZIP
  54. :
  55. pkzip %1%3 *.*
  56. :
  57. : Here we can put on a BBS advertisement
  58. : The BBS advertisement in this case is E:\ACFILES\BBSAD
  59. : We use Redirection here.
  60. :
  61. :pkzip -z %1%3 <e:\acfiles\bbsad
  62. :
  63. :
  64. : Return to parent directory where we started - where RETURN.ACF
  65. : resides.
  66. :
  67. cd ..
  68. :
  69. :
  70. : Clean directory 1111
  71. :
  72. :
  73. cleandir 1111
  74. :
  75. :
  76. : Delete file if it was converted (not .ZIP already)
  77. :
  78. if not %4 == ZIP del %1%2
  79. :
  80. :
  81. : This returns back the new filename as well as a sweet little ol' msg.
  82. :
  83. :
  84. acf_ret NAME %3.ZIP
  85. if not %4 == ZIP acf_ret MSG File Converted To .ZIP - Thanks for Waiting!
  86. :
  87. :Now we go to the end of the batch file.
  88. :
  89. goto end
  90. :
  91. REM ----------------------------------------------------------------------
  92. :
  93. :virus
  94. :
  95. :
  96. : Now we can run ACF_RET To Return Various Information
  97. :
  98. : The following tells ACFiles not to add the filename to the
  99. :    files.bbs (DELETE)
  100. :
  101. : Then it returns a message that a virus was found.
  102. :
  103. : Next it gives them no credit for the upload.
  104. : It also gives back 0 time credit ratio (valid for First U/L Only)
  105. :
  106. acf_ret DELETE
  107. acf_ret MSG Virus Found - Deleted!
  108. acf_ret NOCREDIT
  109. acf_ret TIME 0
  110. :
  111. :
  112. : Now let's delete the file..Optionally you could perhaps move
  113. : the file elsewhere for you to look over.
  114. :
  115. del %1%2
  116. :
  117. : Note ACFiles does not delete the file - it is up to the batch
  118. : file to do that operation.  DELETE only states not to put the
  119. : entry into the FILES.BBS
  120. :
  121. :
  122. : Now let's clean up the temp. directory made.
  123. :
  124. cleandir 1111
  125. :
  126. : And finally we end the batch file
  127. :
  128. goto end
  129. :
  130. REM ----------------------------------------------------------------------
  131. :
  132. :end
  133. :
  134. REM ----------------------------------------------------------------------
  135.  
  136.  
  137.